import request from '@/utils/request'
export default {
   addAssetInfo(assetInfo) {
        return request({
            url: '/asManager/asset/addAssetInfo',
            method: 'post',
            data: assetInfo
        })
    },


   getAssetInfoById(id){
        return request({
            url: '/asManager/asset/getAssetInfo/' + id,
            method: 'get'
        })
    },

   updateAssetInfo(assetInfo){
        return request({
            url: '/asManager/asset/updateAssetInfo',
            method: 'post',
            data: assetInfo
        })
    },

   getPublishAssetInfo(id){
        return request({
            url: '/asManager/asset/getPublishAssetInfoByAssetId/'+id,
            method: 'get'
        })
    },

   getAssetListPage(current, limit, assetQuery) {
        return request({
           url: `/asManager/asset/pageAssetCondition/${current}/${limit}`,
            method: 'post',
           //data: 表示对象转换json进行传递到接口里面
            data: assetQuery
        })
    },


   getDepAssetListPage(current, limit, assetQuery) {
        return request({
           url: `/asManager/asset/pageDepAssetCondition/${current}/${limit}`,
            method: 'post',
           //data: 表示对象转换json进行传递到接口里面
            data: assetQuery
        })
    },

   publishAssetInfo(id){
        return request({
            url: '/asManager/asset/publishAsset/'+id,
            method: 'get'
        })
    },
    deleteAssetId(id) {
        return request({
            url: `/asManager/asset/${id}`,
            method: 'delete'
        })
    },
    updateStatus(id, status){
        return request({
            url: `/asManager/asset/updateStatus/${id}/${status}`,
            method: 'get'
        })
    },
    pageAssetStaff(current, limit){
        return request({
           url: `/asManager/assetstaff/pageAssetStaff/${current}/${limit}`,
            method: 'get',
        })
    },
    getAssetApplyListPage(){
        return request({
          url: `/asManager/apply/getAssetApplyListPage`,
          method: 'get'
        })
      },
      getAssetApplyListPageAll(){
        return request({
          url: `/asManager/apply/getAssetApplyListPageAll`,
          method: 'get'
        })
      },
      pageAssetStaff(){
        return request({
            url: `/asManager/assetstaff/pageAssetStaff`,
            method: 'get'
        })
      },

      overAsset(id){
        return request({
            url: `/asManager/assetstaff/over/${id}`,
            method: 'get'
        })
      },

      backAsset(id){
        return request({
            url: `/asManager/assetstaff/back/${id}`,
            method: 'get'
        })
      }

}
